﻿using Company.Application.Share.Interfaces;
using Company.Shell.Models;
using Company.Shell.Services;
using Company.Shell.Views;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Unity;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace Company.Shell
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : PrismApplication
    {
        protected override Window CreateShell()
        {
            return new ShellView();
        }

        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterSingleton<ISession, Session>();//注册会话
            containerRegistry.RegisterSingleton<IWebManager, WebManager>();//注册HTTP服务类
        }

        /// <summary>
        /// 配置模块路径
        /// </summary>
        /// <returns></returns>
        protected override IModuleCatalog CreateModuleCatalog()
        {
            return new DirectoryModuleCatalog 
            {
                ModulePath = @"./",
            };
        }
    }
}
